/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package domain;

import java.io.Serializable;
import java.sql.Date;
import java.util.List;
import java.util.Observer;

/**
 *
 * @author Damador
 */
public class Seance implements SeanceObservable, Serializable{
    
    private int id_seance;
    private int prix_depart;
    private int reserve;
    private java.sql.Date date_ouverture;
    private java.sql.Date date_fermeture;
    private String etat;
    private List<Observer> observerCollection;

    public Seance() {
    }

    
    public Date getDate_fermeture() {
        return date_fermeture;
    }

    public void setDate_fermeture(Date date_fermeture) {
        this.date_fermeture = date_fermeture;
    }

    public Date getDate_ouverture() {
        return date_ouverture;
    }

    public void setDate_ouverture(Date date_ouverture) {
        this.date_ouverture = date_ouverture;
    }

    public String getEtat() {
        return etat;
    }

    public void setEtat(String etat) {
        this.etat = etat;
    }

    public int getId_seance() {
        return id_seance;
    }

    public void setId_seance(int id_seance) {
        this.id_seance = id_seance;
    }

    public List<Observer> getObserverCOllection() {
        return observerCollection;
    }

    public void setObserverCOllection(List<Observer> observerCOllection) {
        this.observerCollection = observerCOllection;
    }

    public int getPrix_depart() {
        return prix_depart;
    }

    public void setPrix_depart(int prix_depart) {
        this.prix_depart = prix_depart;
    }

    public int getReserve() {
        return reserve;
    }

    public void setReserve(int reserve) {
        this.reserve = reserve;
    }

    @Override
    public void addObserver(Observer o) {
        observerCollection.add(o);
    }

    @Override
    public void removeObserver(Observer o) {
        observerCollection.remove(o);
    }

    @Override
    public void notifyObserver() {
        for(int i = 0;i < observerCollection.size(); i++) {
            observerCollection.get(i).notify();
        }
    }
    
    
    
}
